﻿using System.Linq;
using Core.SystemTests.Common;
using NUnit.Framework;
using Wombat.Data.Model;

namespace Core.SystemTests
{
    public class StreamRepositorySystemTests : SystemTestBase
    {
        [Test]
        public void CanInsertEntity()
        {
            const string domName = "SystemTestsDomain";
            var ent = GetEntitiesContext();
            var dom = new Domain() {Name = domName};
            ent.AddToDomains(dom);
            ent.SaveChanges();

            var theDom = ent.Domains.FirstOrDefault(d => d.Name == domName);
            Assert.That(theDom, Is.Not.Null);
        }
    }
}
